frappe.pages['print_test'].on_page_load = function (wrapper) {
	var page = frappe.ui.make_app_page({
		parent: wrapper,
		title: 'None',
		single_column: true
	});
	page.load_data = function () {		
		// frappe.db.get_doc('ArticleLibrary', '888')
		// 	.then(doc => {
		// 		var docJson = JSON.stringify(doc);
		// 		window.chrome.webview.postMessage(docJson);
		// 	})		
		frappe.call("frappe_study.frappestudy.page.print_test.print_test.get_doc_withmeta")
			.then(doc => {
				var docJson = JSON.stringify(doc);
				window.chrome.webview.postMessage(docJson);
			})
	};
	page.add_inner_button('打印', () => page.load_data());
}